<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <script>
        var arrs = [
            {
                student_id:1,
                student_name:"张三",
                student_age:18,
                student_hobby:["唱歌","打篮球","画画"]
            },
            {
                student_id:2,
                student_name:"李四",
                student_age:19,
                student_hobby:["游泳","羽毛球","写字"]
            },
            {
                student_id:3,
                student_name:"王五",
                student_age:20,
                student_hobby:["唱歌","读书","乒乓球"]
            }
        ]
        function information(row,col,arr){
            document.write('<table border="1px" cellspacing="0" cellpadding="10px">')   
                for(var i=0;i<row;i++){
                    if(i==0){
                        document.write('<tr>')
                        document.write('<th>'+"学号"+'</th>')
                        document.write('<th>'+"姓名"+'</th>')
                        document.write('<th>'+"年龄"+'</th>')
                        document.write('<th>'+"爱好"+'</th>')
                        document.write('<th>'+"操作"+'</th>')
                        document.write('</tr>')
                    }else{
                        document.write('<tr>')
                        document.write('<td>'+arr[i-1].student_id+'</td>')
                        document.write('<td>'+arr[i-1].student_name+'</td>')
                        document.write('<td>'+arr[i-1].student_age+'</td>')
                        document.write('<td>'+arr[i-1].student_hobby+'</td>')
                        document.write('<td>'+'<a href="#">'+"删除"+'</a>'+'</td>')
                        document.write('</tr>')
                    } 
                }   
            document.write('</table>')
        }  
        information(4,5,arrs);
    </script>
</body>
</html>